package com.gopay.common.domain.log;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * 日志记录表
 * 
 * @LogSystem.java
 * @author dak.wang
 * @2016年3月3日 下午12:58:01 www.gopay.com.cn Inc.All rights reserved.
 */

@Entity
@Table(name = "LOG_SYSTEM")
public class LogSystem extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long id;
    private String custId;
    private String opt;
    private Date createdTs;
    private Integer version;
    private String status;
    private String ip;
    private String operId;

    @Id
    @SequenceGenerator(name = "LOG_SYSTEM_SEQ", sequenceName = "LOG_SYSTEM_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "LOG_SYSTEM_SEQ")
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    @Column(name = "CUST_ID", length = 10)
    public String getCustId() {
        return custId;
    }

    @Column(name = "OPT", length = 10)
    public String getOpt() {
        return opt;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    @Version
    @Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
    public Integer getVersion() {
        return version;
    }

    @Column(name = "STATUS", length = 2)
    public String getStatus() {
        return status;
    }

    @Column(name = "IP", length = 2)
    public String getIp() {
        return ip;
    }

    @Column(name = "OPER_ID", length = 10)
    public String getOperId() {
        return operId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    public void setOpt(String opt) {
        this.opt = opt;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setOperId(String operId) {
        this.operId = operId;
    }

}
